package com.calm.editor.entity;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Transient;

import com.google.gson.annotations.Expose;

@Entity
@DiscriminatorValue("XHTML_PAGE_ELEMENT")
public class Page extends Element {
	@Transient
	private List<Resource> resources;
	@Transient
	private List<Meta> metas;
	@Column(name = "TITLE")
	private String title;
	@OneToMany
	@JoinColumn(name = "PAGE_ID")
	@Expose(serialize = false)
	private List<NodeElement> children;

	public List<Resource> getResources() {
		return resources;
	}

	public void setResources(List<Resource> resources) {
		this.resources = resources;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public List<Meta> getMetas() {
		return metas;
	}

	public void setMetas(List<Meta> metas) {
		this.metas = metas;
	}

	public List<NodeElement> getChildren() {
		return children;
	}

	public void setChildren(List<NodeElement> children) {
		this.children = children;
	}
}
